package cn.gov.pbc.gd.credit.web.controller.work.add;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.liu.jbase.PageListVo;
import com.liu.jbase.controller.impl.BaseControllerImpl;

import cn.gov.pbc.gd.credit.core.service.work.add.IAddService;
import cn.gov.pbc.gd.credit.vo.work.add.AddVo;
import cn.gov.pbc.gd.credit.vo.work.add.ResAddVo;

@Controller
@RequestMapping("/work/add/")	
public class WorkAddController extends BaseControllerImpl<ResAddVo, AddVo, IAddService> {
	
	@Autowired
	private IAddService addService;
	
	/**@datetime 2017年10月1日 上午11:13:17
	 * @author liuxingmi
	 * @desc 
	 * @param addVo
	 * @param request
	 * @return String
	 */
	@RequestMapping("/myself")
	public String myself(AddVo addVo, Model model, HttpServletRequest request){
		
		addVo.setMyself(true);
		
		model.addAttribute("result", addService.page(addVo, new PageListVo<>(), request));
		return "work/add/myWorkAddPage";
	}
}
